﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ET.Monitor.DAL;

namespace ET.Monitor.Model
{
    public class MailSendModel
    {
        MailSendDAL dal = new MailSendDAL();
        string to, cc, title, body, file;
        public MailSendModel()
        { }

        public MailSendModel(string toAddress, string ccAddress, string subject, string body)
        {
            this.to = toAddress;
            this.cc = ccAddress;
            this.body = body;
            this.title = subject;
        }

        public MailSendModel(string toAddress, string ccAddress, string subject, string body,string fileName)
        {
            this.to = toAddress;
            this.cc = ccAddress;
            this.body = body;
            this.title = subject;
            this.file = fileName;
        }

        bool sendMail;

        public bool SendMail
        {
            get { return dal.SendMail(to, cc, title, body); }
            set { sendMail = value; }
        }

        bool sendMailWithAttachment;

        public bool SendMailWithAttachment
        {
            get { return dal.SendMail(to, cc, title, body, file); }
            set { sendMailWithAttachment = value; }
        }
    }
}
